package com.woniu.apiimpl;


import com.woniu.api.HisCheckPriceAPI;
import com.woniu.dto.CheckPriceDto;
import com.woniu.dto.CheckPriceListDto;
import com.woniu.param.CreateOrModifyCheckPriceParam;
import com.woniu.param.DeleteCheckPriceParam;
import com.woniu.param.QueryCheckPriceParam;
import com.woniu.service.IHisCheckPriceService;
import com.woniu.util.Result;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 检查价格表 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2021-11-11
 */
@RestController
@RequestMapping("/checkPrice")
public class HisCheckPriceAPIImpl implements HisCheckPriceAPI {

    @Resource
    private IHisCheckPriceService checkPriceService;

    @Override
    public Result<CheckPriceDto> createCheckPrice(CreateOrModifyCheckPriceParam createOrmodifyCheckPriceParam) {
        CheckPriceDto checkPriceDto = checkPriceService.createCheckPrice(createOrmodifyCheckPriceParam);
        return Result.bulid(CheckPriceDto.class).setData(checkPriceDto);
    }

    @Override
    public Result<CheckPriceListDto> queryCheckPrice(QueryCheckPriceParam queryCheckPriceParam) {
        CheckPriceListDto checkPriceListDto = checkPriceService.queryCheckPrice(queryCheckPriceParam);
        return Result.bulid(CheckPriceListDto.class).setData(checkPriceListDto);
    }

    @Override
    public Result deleteCheckPrice(DeleteCheckPriceParam deleteCheckPriceParam) {
        checkPriceService.deleteCheckPrice(deleteCheckPriceParam);
        return Result.bulid();
    }
}

